package StudyCode.summary.Basic;

import java.text.NumberFormat;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class FormatDouble {
	public static void main(String[] args) {
		NumberFormat cf = NumberFormat.getCurrencyInstance();
		double myAllowance = 5.00;
		cf = NumberFormat.getCurrencyInstance();
		System.out.println("My allowance: " + cf.format(myAllowance));

		double costOfPaintBallGun = 12.34;
		cf = NumberFormat.getCurrencyInstance();
		System.out.println("Cost of Paint Ball Gun: " + cf.format(costOfPaintBallGun));
	}

}
